home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / CoreGateway / Recipient.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  4.7 KB  |  125 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Recipient.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __RECIPIENT__
  15. #define __RECIPIENT__
  16.  
  17. #ifndef __BLJSTANDARDINCLUDES__
  18. #include "BLJStandardIncludes.h"
  19. #endif
  20.  
  21. #ifndef __COREGATEWAYTYPES__
  22. #include "CoreGatewayTypes.h"
  23. #endif
  24.  
  25. #ifndef __HANDLEOBJECT__
  26. #include "HandleObject.h"
  27. #endif
  28.  
  29. #ifndef __OBJECTLIST__
  30. #include "ObjectList.h"
  31. #endif
  32.  
  33. /***********************************|****************************************/
  34.  
  35.     typedef unsigned char RecipientStatusSet;
  36.     const RecipientStatusSet cUnknown = 0;
  37.     const RecipientStatusSet cReceived = 1;
  38.     const RecipientStatusSet cNotReceived = 2;
  39.     const RecipientStatusSet cTimedOut = 3;
  40.     const RecipientStatusSet cNotResponsible = 4;
  41.     const RecipientStatusSet cAmbiguousRecipient = 5;     // recipient described is not unique
  42.     const RecipientStatusSet cNoSuchRecipient = 6;      // no recipient with this address
  43.     const RecipientStatusSet cBadRecipient = 7;            // recipient appears to be 'bad'
  44.     const RecipientStatusSet cMessageRejectedByDest = 8;
  45.     const RecipientStatusSet cCanNotTranslateContentForRecipient = 9;
  46.     const RecipientStatusSet cRecipientCanNotSendToThisAddress = 10;
  47.  
  48.     const RecipientStatusSet cGroupExpansionProblem = 11;    
  49.     const RecipientStatusSet cCanNotSupportBCCRecipient = 17;
  50.     
  51.     const RecipientStatusSet cNoTranslatableContent = 12;
  52.     const RecipientStatusSet cRequireTEXTContent = 13;
  53.     const RecipientStatusSet cRequireIMAGContent = 14;
  54.     const RecipientStatusSet cRecipientCanNotReceiveEnclosures = 18;
  55.  
  56.     const RecipientStatusSet cLetterTooLarge = 15;
  57.     const RecipientStatusSet cGatewayDiskTemporarilyTooFull    = 16;
  58.  
  59.  
  60. /***********************************|****************************************/
  61.     
  62.     typedef unsigned char RecipientTypeSet;
  63.     const RecipientTypeSet fromRecipient = 0;
  64.     const RecipientTypeSet toRecipient = 1;
  65.     const RecipientTypeSet ccRecipient = 2;
  66.     const RecipientTypeSet bccRecipient = 3;
  67.     
  68. /***********************************|****************************************/
  69.  
  70. class TRecipient : public THandleObject 
  71. {
  72. public:
  73.     virtual                         ~TRecipient();
  74.  
  75.     
  76.     //    Recipient Name/Type or CID Methods
  77.     //    ==================================
  78.     virtual Boolean                 GetRecipientName (TRString& name) const = 0; // return name and true if address has name, false otherwise
  79.     virtual Boolean                 GetRecipientType (TRString& type) const = 0; // return type and true if address has a type, false otherwise
  80.  
  81.     virtual Boolean                 GetCID (CreationID& cid) const = 0; // return true and cid if address has cid, false otherwise
  82.  
  83.     //    Path Information
  84.     //    ================
  85.     virtual Boolean                    IsPathInfoPresent () const = 0;    //    return true if the recipient has any path information
  86.     virtual Boolean                    IsPathInfoOptional () const = 0; // return true if the path info is present but not required
  87.     virtual Boolean                    IsNameAndPathUnique () const = 0; // return true if the name & path info uniquely identify a recipient
  88.     
  89.     virtual Boolean                 GetPathDNode (unsigned long& dNode) const; // return true if recipient has dNode, false otherwise
  90.  
  91.     virtual unsigned short             GetPathNameCount () const; // return the number of path name items
  92.     virtual void                     GetPathNameItem (unsigned short item, TRString& nodeName) const; // get item-th (one based) pathname, return true if available.
  93.  
  94.     virtual Boolean                 GetDirectoryName (DirectoryName& directoryName) const; // return directory name and true if available, false otherwise
  95.  
  96.     
  97.     //    Recipient Extension Data
  98.     //    ======================
  99.     virtual Boolean                    IsAddressTypePresent () const = 0;    // return true if an address type is present
  100.     virtual OSType                     GetAddressType () const = 0; // return the address type
  101.     virtual unsigned long             GetExtensionDataSize () const  = 0;
  102.     virtual void                     GetExtensionData (unsigned long offset, void *buffer, unsigned long bufferSize) const = 0;
  103.  
  104.     //    Recpient Status
  105.     //    ===============
  106.     virtual Boolean                 GetResponsible () const = 0; // return true if this recipient must be delivered to, false otherwise
  107.     virtual Boolean                 SetStatus ( RecipientStatusSet ) = 0; // set recipient status
  108.     virtual RecipientStatusSet         GetStatus () const = 0; // get recipient status
  109.     
  110.  
  111.     //    Debugging purposes only
  112.     virtual ostream&                 Describe(ostream&) const;    // Display info about object, calls DescribeSubclass()
  113.     virtual ostream&                DescribeSubclass(ostream&) const; // Display specific info about object, should override
  114.     virtual ostream&                 operator >> ( ostream& ) const;
  115.  
  116. protected:
  117.                                     TRecipient();
  118. };
  119.  
  120. /***********************************|****************************************/
  121.  
  122. DeclareList(TRecipient,TRecipientList);
  123.  
  124. #endif    // __RECIPIENT__
  125.